Aim:

Data Loading and Preprocessing

Observation:

The above figure shows the distribution of various important attributes of the dataset, to help understand the representation of majority groups and the marginalised groups in various areas. It would help us identify and focus on those groups for biases or unfairness. The dominant groups are

  • Sex - Males
  • Race - Whites
  • Native Country - High Income Countries
  • Occupation - Private
  • Marital Status - Married-to-civilian
  • Education - Level 10
  • Age - 35-50 years
  • Hours-of-week - 40 per week

Task 1 - Build and analyse the performance of multiple ML models (15%)

  • Hyperparameter Optimising Algorithm - GridSearchCV from sklearn
  • Cross-Validation Algorithm - RepeatedStratifiedKFold
  • Evaluation Metric - F1
  • Model 1 - Decision Tree (depth=3)
  • Model 2 - Decision Tree (depth=7)
  • Model 3 - Logistic Regression
  • Model 4 - Random Forest

Hyperparameter optimisation Algorithm

Machine Learning Models

Evaluation Metric

The above ROC plots show the performnace of Random Forest as the best among all models.

Task 2 - Interpret your models (20%):

LIME - Locally Interpretable Model-Agnostic Explanations facilitates the interpretation of the model, by approximating it locally. The output of LIME provides an intuiton into the innerworkings of ML algortihms and the feature used. When used to interpret a blackbox ML model, it can help build the credibility of the results produced by the blackbox ML model.

Local Interpretation Framework - LIME

Observation:

Global Interpretation Framework - Global Surrogate Model

Observation:

Task 3: Error Analysis

Reference: https://ocw.mit.edu/courses/res-ec-001-exploring-fairness-in-machine-learning-for-international-development-spring-2020/pages/module-three-framework/

As per litertaure, Race, Sex, Native_country, marital status, socio-economic status can be considered as the most sensitive variables here, that could potentially face bias.

  • As we can see in the plot, highest importance has been given to factors like Education, Age, Hours-of-work and capital-gain by all the models.

  • But surprisingly, sensitive variables like Marital-status and Sex appear to have a considerable impact on the predictions.

  • Even though the original dataset does not show any correlation with Marital-status, all three models appear to have picked up a correlation with marital-status as well.

Error Analysis

In the above confusion matrixes, all of the models are giving around 10% of False negatives out of the total predictions. In these False negatives, if we chack in detail. We want to how mant people were given False negatives (i.i.were given<=50K band but were actually >50K)

Since we want to identify bias i.e. False negatives we focus on analysing F1 score. As we have seen in part 1 , the F1 score is low for logR and DT3,DT7 which means these models are producing most number of false predictions.

Prevelance to identify bias against women who earned >50K in the overall dataset vs women who were predicted to earn>50K

Above plots show, how repersentation of groups in training dataset is carried forward to a large extent, which in turn builds inequality more widely in the society. Potential Sources of these biases could be:

  1. Reporting Bias - There could be people who want to hide their capital gains/loss to evade tax, thus leading to incorrect income_band allocation
  2. Selection Bias - The data might have majorly been collected from metro cities, where mostly priviledged people live, thus creating imbalance in the dataset.
  3. Overgeneralisation - Groups that are not usually considered as 'ignored', might suffer overgeneralization. e.g. in the above plot, fig3 shows people married to Armed forced spouse have almost zero presence in the group earning >50K. This might be because married people in general are seen as one single group, irrespective of their spouse's profession. If in an ML model, all married people irrespective of subcategories are grouped as one category, the bias faced by subgroups would never get higlighted.
  4. Out-group homogeneity bias: In the original dataset, Races have been very abruptly categorised. The representation of brown-people, who happen to form a large chunk of USA's population do not have a dedicated category and have been put as 'Others'.
  5. Biased labels - There are categories of Marital-Status are just too detailed, like Married-civ-spouse, Married-AF-spouse, Seperated, Spouse Absent which should not be included at all.
  6. Algorithmic Bias - As mentioned in class notes, Human data perpetuates biases, and these biases get reflected in our ML models. As observed in the above fig, the amount of prevelance in ML predictions is almost same as that in original dataset. The ML model perpetuate the biases that have been given to it in the form of data, unless handled otherwise.
  7. Bias in Statistics and ML - Depending on the type of ML model, there could be a role of ML model in adding up a bias unknowingly, by taking up correlations that are human-developed.

In order to mitigate bias, we have to minimise 'False Negatives' that are seemingly

Intersectional Evaluation

Plot the below three situations, to show how combination of marginalised groups can cause even higher bias. Plot Prevelance in

  1. Actual Data (Overall) - Actual Negatives
  2. Predictions (Overall) - False Negatives
  3. Predictions (Non-White) - False Negatives
  4. Predictions (Female) - False Negatives
  5. Predictions(Female + Non-White) - False Negatives

Three graphs - for models with above 5 numbers(bars)

Fairness Metric

On the basis of the application that we are dealing with here, we want to avoid False predictions against marginalised groups. Since the apllication and usage for this income_band prediction will be used to calculate credit score, which is an improtant evaluation mteric for banks to sanction loans, we would not want the maringalised groups to get allocated False, specially False negatives (i.e. They actually earn more >50K, but AI system makes a biased predictiona nd puts them in the '<=50K' bracket.

So we would select F1 Score(fig 2 in question 1 of the CW) and Recall to establish which model is most fair.

What-if Counterfactuals

Lookng at the Global Surrogate Interpretations, we select Education as our actionable variable to check counter factuals. As we can see in Fig 1, the districtuion of Education level maximises at 9. So if upgrade people's education from 5,7,8 to 9, we hope to see some considerable changes.

Observations:

Task 4:

Datasheet

1. Motivation

2. Composition

3. Collection Process

4. Preprocessing

5. Uses

6. Distribution

The dataset is made available in public domain by the University of California, Irvine and is free to use for non-commercial purposes. The use of data should abide by the US constitution law of confidentiality and privacy, under which it was collected.

7. Maintenance

The Adult Income Dataset is hosted and maintained by the University of California, Irvine (UCI) Machine Learning Repository. The repository is maintained by the Center for Machine Learning and Intelligent Systems at UCI. UCI is responsible for availability and integrity of the dataset, including storage, access, updates etc.

Model Card

1. Model Details

2. Intended Use

The model is intended to identify instances of racial, sexual or any other type of apparent bias in the dataset, which is identified through the predictions made by the ML model. The model also involves Local and Global interpretability framework that is being used to have concrete conclusions on things like feature importance, probability of individual predictions.

3. Interpretability

  • Local Framework: The local framewok is relevant to check for local interpretations of the model, i.e. interpretation of individual records as to why a predcition has been generatd by the ML model. LIME(Local Interpretable Model-agnostic Explainations) method has been used here.
  • Global Framework: The global framework is important to understand the overall sentimnent of the dataset, like which faetures have been given the maximum importance during predictions. Global Surrogate Framework has been here to perform the same.

3. Relevant Attributes:

The most relevant attributes used in the model are Martal-status, Education, Age, Hours_of_week, WorkClass. Other attributes emerge as relevant occasionally but not throughout the dataset.

4. Quantitative Analysis:

Predictions from 4 AI models have been compared the overall fairness and performance has been measures through various methods like F1 Score, Recall, Prevelance, False Negatives Ratio in the above tasks.

5. Ethical Considerations:

Race, Sex, Native Country, Marital Status are the sensitive variables that have been focussed on, to identify instances of biases among differnt classes. Task 3 involves various use-cases where fairness of the models have been tried and presented. No concrete biases on the basis of these sensitive attributes were observed.

6. Recommendation and Caveats:

Sensitive attributes like Race, Sex, Native Country Marital Status have been regrouped in a way such that bias (if any) is more apparent. e.g. Race is divided into 'White' and 'Non-White' because historically 'Non-Whites' in general have been a victim of bias in the society. But for detailed studies, individual classes should be studied to catch biases that are less apparent among classes.